//
//  VKMainPersonController.m
//  V-Learn
//
//  Created by liubo on 2019/3/19.
//  Copyright © 2019 yxk. All rights reserved.
//

#import "VKMainPersonController.h"
#import "JhBaseHeaderView.h"
#import "VKMainPersonView.h"
#import "CGXPickerView.h"
#import "VKContactView.h"
#import "VKContactGrifView.h"
#import "VKMainPersonModel.h"
#import "VKMePersonView.h"
#import "VKMeBiePersonView.h"
#import "VKMePeibanPersonView.h"
#import "NSString+Category.h"
#define JhColor(r, g, b)     [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define JhRandomColor JhColor(arc4random_uniform(255), arc4random_uniform(255), arc4random_uniform(255))
@interface VKMainPersonController ()
@property (nonatomic , strong) CGXPickerViewManager *manager;
@end

@implementation VKMainPersonController
//- (CGXPickerViewManager *)manager{
//    if (!_manager) {
//        _manager = [[CGXPickerViewManager alloc] init];
//    }
//    return _manager;
//}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    self.view.backgroundColor = [UIColor whiteColor];
    //    self.edgesForExtendedLayout = @[];
    self.automaticallyAdjustsScrollViewInsets = NO;
    //初始化选中
//    self.manager = [[CGXPickerViewManager alloc] init];
//    self.manager.pickerTitleSelectColor = [UIColor orangeColor];
    
    self.Jh_navTitle = @"个人档案";
    [self.navigationController.navigationBar setTitleTextAttributes:
     @{NSFontAttributeName:[UIFont systemFontOfSize:15.0f],
       NSForegroundColorAttributeName:[UIColor blackColor]}];
    [self setupLayout];
}
- (void)setupLayout{
    
    __weak typeof(self) weakSelf = self;
    
    UIView *tableViewHeader = [[UIView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen cz_screenWidth], 100)];
    tableViewHeader.backgroundColor = [UIColor whiteColor];
    self.Jh_formTableView.tableHeaderView = tableViewHeader;
    
    UILabel *nameLabel = [[UILabel alloc]init];
    nameLabel.text = @"说明:";
    nameLabel.textColor = [UIColor redColor];
    [tableViewHeader addSubview:nameLabel];
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@15);
        make.top.mas_equalTo(@15);
    }];
    
    
    // 第一组 -----------------------------
    NSMutableArray *cellArr0 = [NSMutableArray array];
    
    JhFormCellModel *setion0Cell0 = JhFormCellModel_Add(@"姓名", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion0Cell0.Jh_placeholder = @"请输入姓名";
    setion0Cell0.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell0]];
    
    // 小名
    JhFormCellModel *setion0Cell1 = JhFormCellModel_Add(@"小名", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion0Cell1.Jh_placeholder = @"请输入小名";
    setion0Cell1.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell1]];
    
    // 英文名
    JhFormCellModel *setion0Cell2 = JhFormCellModel_Add(@"英文名", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeASCIICapable);
    setion0Cell2.Jh_placeholder = @"请输入英文名";
    setion0Cell2.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell2]];
    
    // 性别
    JhFormCellModel *setion0Cell3 = JhFormCellModel_Add(@"性别", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion0Cell3.Jh_placeholder = @"请选择性别";
    setion0Cell3.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell3]];
    setion0Cell3.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        
        NSString *defaultSelValue = [[CGXPickerView showStringPickerDataSourceStyle:CGXStringPickerViewStyleGender] objectAtIndex:1];
        [CGXPickerView showStringPickerWithTitle:@"请选择性别" DefaultSelValue:defaultSelValue IsAutoSelect:YES Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info = selectValue;
            [weakSelf.Jh_formTableView reloadData];
        } Style:CGXStringPickerViewStyleGender];
        
    };
    
    // 出生日期
    JhFormCellModel *setion0Cell4 = JhFormCellModel_Add(@"出生日期", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion0Cell4.Jh_placeholder = @"请选择出生日期";
    setion0Cell4.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell4]];
    setion0Cell4.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        NSDate *now = [NSDate date];
        NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
        fmt.dateFormat = @"yyyy-MM-dd HH:mm:ss";
        NSString *nowStr = [fmt stringFromDate:now];
        
        [CGXPickerView showDatePickerWithTitle:@"出生日期" DateType:UIDatePickerModeDate DefaultSelValue:nil MinDateStr:@"1900-01-01 00:00:00" MaxDateStr:nowStr IsAutoSelect:YES Manager:nil ResultBlock:^(NSString *selectValue) {
//            NSLog(@"%@",selectValue);
            cellModel.Jh_info = selectValue;
            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 所在城市
    JhFormCellModel *setion0Cell5 = JhFormCellModel_Add(@"所在城市", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion0Cell5.Jh_placeholder = @"请选择所在城市";
    setion0Cell5.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell5]];
    setion0Cell5.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {

        [CGXPickerView showAddressPickerWithTitle:@"请选择你的城市" DefaultSelected:@[@0, @0,@0] IsAutoSelect:YES Manager:nil ResultBlock:^(NSArray *selectAddressArr, NSArray *selectAddressRow) {
//            NSLog(@"%@-%@",selectAddressArr,selectAddressRow);
            cellModel.Jh_info = [NSString stringWithFormat:@"%@%@%@", selectAddressArr[0], selectAddressArr[1],selectAddressArr[2]];
            [weakSelf.Jh_formTableView reloadData];

        }];
    };

    // 兄弟姐妹
    JhFormCellModel *setion0Cell6 = JhFormCellModel_Add(@"兄弟姐妹", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion0Cell6.Jh_placeholder = @"请选择兄弟姐妹";
    setion0Cell6.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr0 addObjectsFromArray: @[setion0Cell6]];
    setion0Cell6.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
//        // 多选
//        [CGXPickerView showStringPickerWithTitle:@"请选择兄弟姐妹" DataSource:@[@"哥哥",@"弟弟",@"姐姐",@"妹妹"] DefaultSelValue:@"哥哥" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
//            NSLog(@"%@",selectValue);
//            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
//            cellModel.Jh_info = selectValue;
//
//            [weakSelf.Jh_formTableView reloadData];
//        }];

        VKMePersonView *personView = [[VKMePersonView alloc]initWithTitle:@"选择兄弟姐妹" withDataArray:@[].mutableCopy withTitleArray:@[@"哥哥",@"弟弟",@"姐姐",@"妹妹"].mutableCopy];
        [[UIApplication sharedApplication].keyWindow addSubview:personView];
        [personView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(@0);
        }];
        personView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {

            cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
            cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
            [personView cancelDownView];
            [weakSelf.Jh_formTableView reloadData];
        };
        
    };
    
    
    JhFormSectionModel *section0 = JhSectionModel_Add(cellArr0);
    
    JhBaseHeaderView *headerV0 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV0.backgroundColor = BaseBgWhiteColor;
    headerV0.Jh_leftTitle = @"儿童基本信息(必填)";
    headerV0.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:237 green:15 blue:0];
    headerV0.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section0.Jh_headerView = headerV0;
    section0.Jh_headerHeight= headerV0.bounds.size.height;
    headerV0.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV0.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    
    // 第二组 -----------------------------
    //姓名
    NSMutableArray *cellArr1 = [NSMutableArray array];
    
    JhFormCellModel *setion1Cell0 = JhFormCellModel_Add(@"姓名", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell0.Jh_placeholder = @"请输入姓名";
    setion1Cell0.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell0]];
    
    // 电话
    JhFormCellModel *setion1Cell1 = JhFormCellModel_Add(@"电话", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell1.Jh_placeholder = @"请输入电话";
    setion1Cell1.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell1]];
    
    // qq
    JhFormCellModel *setion1Cell2 = JhFormCellModel_Add(@"QQ", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell2.Jh_placeholder = @"请输入QQ";
    setion1Cell2.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell2]];
    
    // 微信
    JhFormCellModel *setion1Cell3 = JhFormCellModel_Add(@"微信", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell3.Jh_placeholder = @"请输入微信";
    setion1Cell3.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell3]];
    
    // email
    JhFormCellModel *setion1Cell4 = JhFormCellModel_Add(@"Email", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell4.Jh_placeholder = @"请输入Email";
    setion1Cell4.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell4]];
    
    // 联系地址
    JhFormCellModel *setion1Cell5 = JhFormCellModel_Add(@"联系地址", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell5.Jh_placeholder = @"请输入联系地址";
    setion1Cell5.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell5]];
    
    
    // 年龄
    JhFormCellModel *setion1Cell6 = JhFormCellModel_Add(@"年龄", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion1Cell6.Jh_placeholder = @"请输入年龄";
    setion1Cell6.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell6]];
    
    
    
    // 与儿童的关系
    JhFormCellModel *setion1Cell7 = JhFormCellModel_Add(@"与儿童的关系", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion1Cell7.Jh_placeholder = @"请选择与儿童的关系";
    setion1Cell7.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell7]];
    setion1Cell7.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择与儿童的关系" DataSource:@[@"父亲",@"母亲"] DefaultSelValue:@"父亲" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            NSLog(@"%@,%@",selectValue,selectRow);
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
//        [CGXPickerView showStringPickerWithTitle:@"请选择与儿童的关系" DataSource:@[@"父亲",@"母亲"] DefaultSelValue:@"父亲" IsAutoSelect:NO Manager:self.manager ResultBlock:^(id selectValue, id selectRow) {
////            NSLog(@"%@",selectValue);
////            weakSelf.navigationItem.title = selectValue;; ;
//            NSLog(@"%@,%@",selectValue,selectRow);
//            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
//            cellModel.Jh_info = selectValue;
//
//            [weakSelf.Jh_formTableView reloadData];
//        }];
    };
    
    
    // 学历
    JhFormCellModel *setion1Cell9 = JhFormCellModel_Add(@"学历", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion1Cell9.Jh_placeholder = @"请选择学历";
    setion1Cell9.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell9]];
    setion1Cell9.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择学历" DataSource:@[@"高中",@"大专",@"本科",@"研究生",@"博士",@"教授",@"其他"] DefaultSelValue:@"本科" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
#pragma mark -
    // 职业
    JhFormCellModel *setion1Cell10 = JhFormCellModel_Add(@"职业", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion1Cell10.Jh_placeholder = @"请选择职业";
    setion1Cell10.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr1 addObjectsFromArray: @[setion1Cell10]];
    setion1Cell10.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        //1,英语教师 2,翻译 3,外交官 4,对外贸易 5,医生 6，律师 7，行政 8，餐饮业   9，服务业  10 ，其他
        [CGXPickerView showStringPickerWithTitle:@"请选择职业" DataSource:@[@"英语教师",@"翻译",@"外交官",@"对外贸易",@"医生",@"律师",@"行政",@"餐饮业",@"服务业",@"其他"] DefaultSelValue:@"英语教师" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    
    
    JhFormSectionModel *section1 = JhSectionModel_Add(cellArr1);
    
    JhBaseHeaderView *headerV1 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV1.backgroundColor = BaseBgWhiteColor;
    headerV1.Jh_leftTitle = @"主要联系人(必填)";
    headerV1.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section1.Jh_headerView = headerV1;
    section1.Jh_headerHeight= headerV1.bounds.size.height;
    headerV1.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV1.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    
    // 第三组 -----------------------------
    
    //姓名
    NSMutableArray *cellArr2 = [NSMutableArray array];
    
    JhFormCellModel *setion2Cell0 = JhFormCellModel_Add(@"姓名", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion2Cell0.Jh_placeholder = @"请输入姓名";
    setion2Cell0.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr2 addObjectsFromArray: @[setion2Cell0]];
    
    // 年领
    JhFormCellModel *setion2Cell1 = JhFormCellModel_Add(@"年龄", @"", JhFormCellTypeInput, YES, YES, UIKeyboardTypeDefault);
    setion2Cell1.Jh_placeholder = @"请输入年龄";
    setion2Cell1.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr2 addObjectsFromArray: @[setion2Cell1]];
    
    // 与儿童的关系
    JhFormCellModel *setion2Cell2 = JhFormCellModel_Add(@"与儿童的关系", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion2Cell2.Jh_placeholder = @"请输入与儿童的关系";
    setion2Cell2.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr2 addObjectsFromArray: @[setion2Cell2]];
    setion2Cell2.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择与儿童的关系" DataSource:@[@"父亲",@"母亲"] DefaultSelValue:@"父亲" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
//            NSLog(@"%@",selectValue);
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 学历
    JhFormCellModel *setion2Cell3 = JhFormCellModel_Add(@"学历", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion2Cell3.Jh_placeholder = @"请输入学历";
    setion2Cell3.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr2 addObjectsFromArray: @[setion2Cell3]];
    setion2Cell3.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择学历" DataSource:@[@"高中",@"大专",@"本科",@"研究生",@"博士",@"教授",@"其他"] DefaultSelValue:@"本科" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 职业
    JhFormCellModel *setion2Cell4 = JhFormCellModel_Add(@"职业", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion2Cell4.Jh_placeholder = @"请输入职业";
    setion2Cell4.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr2 addObjectsFromArray: @[setion2Cell4]];
    setion2Cell4.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择职业" DataSource:@[@"英语教师",@"翻译",@"外交官",@"对外贸易",@"医生",@"律师",@"行政",@"餐饮业",@"服务业",@"其他"] DefaultSelValue:@"英语教师" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    
    JhFormSectionModel *section2 = JhSectionModel_Add(cellArr2);
    
    JhBaseHeaderView *headerV2 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV2.backgroundColor = BaseBgWhiteColor;
    headerV2.Jh_leftTitle = @"其他联系人(必填)";
    headerV2.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section2.Jh_headerView = headerV2;
    section2.Jh_headerHeight= headerV2.bounds.size.height;
    headerV2.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV2.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    
    
    // 第四组 -----------------------------
    
    //姓名
    NSMutableArray *cellArr3 = [NSMutableArray array];
    
    JhFormSectionModel *section3 = JhSectionModel_Add(cellArr3);
    
    JhBaseHeaderView *headerV3 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV3.backgroundColor = BaseBgWhiteColor;
    headerV3.Jh_leftTitle = @"养育中的主要难题(选填)";
    headerV3.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section3.Jh_headerView = headerV3;
    section3.Jh_headerHeight= headerV3.bounds.size.height;
    headerV3.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV3.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    // 尾部
    VKMainPersonView *footerV = [[VKMainPersonView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 310) withDataArray:@[].mutableCopy];
    footerV.backgroundColor = [UIColor whiteColor];
    section3.Jh_footerView = footerV;
    section3.Jh_footerHeight= footerV.bounds.size.height;
    
    
    // 第五组 -----------------------------
    
    //作息规律
    NSMutableArray *cellArr4 = [NSMutableArray array];
    
    JhFormCellModel *setion4Cell0 = JhFormCellModel_Add(@"作息规律", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion4Cell0.Jh_placeholder = @"是否作息规律";
    setion4Cell0.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr4 addObjectsFromArray: @[setion4Cell0]];
    setion4Cell0.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"是否作息规律" DataSource:@[@"是",@"否"] DefaultSelValue:@"是" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 入睡情况
    JhFormCellModel *setion4Cell1 = JhFormCellModel_Add(@"入睡情况", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion4Cell1.Jh_placeholder = @"有无困难";
    setion4Cell1.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr4 addObjectsFromArray: @[setion4Cell1]];
    setion4Cell1.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"睡眠情况" DataSource:@[@"良好",@"有困难"] DefaultSelValue:@"良好" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 睡眠质量
    JhFormCellModel *setion4Cell2 = JhFormCellModel_Add(@"睡眠质量", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion4Cell2.Jh_placeholder = @"请选择睡眠质量";
    setion4Cell2.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr4 addObjectsFromArray: @[setion4Cell2]];
    setion4Cell2.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择睡眠质量" DataSource:@[@"良好",@"一般",@"差"] DefaultSelValue:@"良好" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 每日睡眠时间
    JhFormCellModel *setion4Cell3 = JhFormCellModel_Add(@"每日睡眠时间", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion4Cell3.Jh_placeholder = @"请选择每日睡眠时间";
    setion4Cell3.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr4 addObjectsFromArray: @[setion4Cell3]];
    setion4Cell3.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
#pragma 时间
        NSArray *dataSources = @[@[@"0小时", @"1小时", @"2小时", @"3小时", @"4小时", @"5小时", @"6小时", @"7小时", @"8小时", @"9小时", @"10小时", @"11小时", @"12小时", @"13小时", @"14小时", @"15小时", @"16小时", @"17小时", @"18小时", @"19小时", @"20小时", @"21小时", @"22小时", @"23小时", @"24小时" ], @[@"0分",@"1分",@"2分",@"3分",@"4分",@"5分",@"6分",@"7分",@"8分",@"9分",@"10分",@"11分",@"12分",@"13分",@"14分",@"15分",@"16分",@"17分",@"18分",@"19分",@"20分",@"21分",@"22分",@"23分",@"24分",@"25分",@"26分",@"27分",@"28分",@"29分",@"30分",@"31分",@"32分",@"33分",@"34分",@"35分",@"36分",@"37分",@"38分",@"39分",@"40分",@"41分",@"42分",@"43分",@"44分",@"45分",@"46分",@"47分",@"48分",@"49分",@"50分",@"51分",@"52分",@"53分",@"54分",@"55分",@"56分",@"57分",@"58分",@"59分" ]];
        NSArray *defaultSelValueArr = @[@"00:00-0分"];
//        0小时 -24小时
//        0分-59分
        [CGXPickerView showStringPickerWithTitle:@"请选择每日睡眠时间" DataSource:dataSources DefaultSelValue:defaultSelValueArr IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
//            NSLog(@"%@",selectValue);
            cellModel.Jh_info = [NSString stringWithFormat:@"%@ - %@",selectValue[0],selectValue[1]];
            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 饮食习惯
    JhFormCellModel *setion4Cell4 = JhFormCellModel_Add(@"饮食习惯", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion4Cell4.Jh_placeholder = @"请选择饮食习惯";
    setion4Cell4.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr4 addObjectsFromArray: @[setion4Cell4]];
    setion4Cell4.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"请选择饮食习惯" DataSource:@[@"不偏食",@"偏菜类",@"偏肉类",@"偏零食"] DefaultSelValue:@"不偏食" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    
    
    JhFormSectionModel *section4 = JhSectionModel_Add(cellArr4);
    
    // 尾部
    VKContactView *contactView = [[VKContactView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 110)];
    contactView.backgroundColor = [UIColor whiteColor];
    section4.Jh_footerView = contactView;
    section4.Jh_footerHeight= contactView.bounds.size.height;
    
    JhBaseHeaderView *headerV4 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV4.backgroundColor = BaseBgWhiteColor;
    headerV4.Jh_leftTitle = @"生活习惯描述(选填)";
    headerV4.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section4.Jh_headerView = headerV4;
    section4.Jh_headerHeight= headerV4.bounds.size.height;
    headerV4.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV4.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    // 第六组 -----------------------------
    
    //姓名
    NSMutableArray *cellArr5 = [NSMutableArray array];
    
    JhFormSectionModel *section5 = JhSectionModel_Add(cellArr5);
    // 尾部
    VKContactGrifView *gridView = [[VKContactGrifView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 310) withDataArray:@[].mutableCopy];
    gridView.backgroundColor = [UIColor whiteColor];
    section5.Jh_footerView = gridView;
    section5.Jh_footerHeight= gridView.bounds.size.height;
#pragma 多选
    JhBaseHeaderView *headerV5 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV5.backgroundColor = BaseBgWhiteColor;
    headerV5.Jh_leftTitle = @"社交能力与兴趣描述(选填)";
    headerV5.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section5.Jh_headerView = headerV5;
    section5.Jh_headerHeight= headerV5.bounds.size.height;
    headerV5.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV5.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    // 第七组 -----------------------------
    
    //主要陪伴人
    NSMutableArray *cellArr6 = [NSMutableArray array];
    
    JhFormCellModel *setion6Cell0 = JhFormCellModel_Add(@"主要陪伴人", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion6Cell0.Jh_placeholder = @"请选择主要陪伴人";
    setion6Cell0.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr6 addObjectsFromArray: @[setion6Cell0]];
    setion6Cell0.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"主要陪伴人" DataSource:@[@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爷爷" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;
            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 英语程度
    JhFormCellModel *setion6Cell1 = JhFormCellModel_Add(@"英语程度", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion6Cell1.Jh_placeholder = @"请选择英语程度";
    setion6Cell1.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr6 addObjectsFromArray: @[setion6Cell1]];
    setion6Cell1.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"英语程度" DataSource:@[@"CET-4",@"CET-6",@"TEM-4",@"TEM-8",@"IELTS",@"TOFEL"] DefaultSelValue:@"CET-4" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 口语水平
    JhFormCellModel *setion6Cell2 = JhFormCellModel_Add(@"口语水平", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion6Cell2.Jh_placeholder = @"请选择口语水平";
    setion6Cell2.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr6 addObjectsFromArray: @[setion6Cell2]];
    setion6Cell2.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"口语水平" DataSource:@[@"生活和工作中从不使用英语",@"生活能够用简单英语交流 ",@"生活和工作中能够用英文流利沟通 ",@"能够从事涉外公务活动和英语口语翻译工作"] DefaultSelValue:@"生活和工作中从不使用英语" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 英语口音
    JhFormCellModel *setion6Cell3 = JhFormCellModel_Add(@"英语口音", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion6Cell3.Jh_placeholder = @"请选择英语口音";
    setion6Cell3.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr6 addObjectsFromArray: @[setion6Cell3]];
    setion6Cell3.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"英语口音" DataSource:@[@"标准美音",@"标准英音",@"一般，美音",@"一般，英音",@"有口音"] DefaultSelValue:@"标准美音" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 每日陪伴时间
    JhFormCellModel *setion6Cell4 = JhFormCellModel_Add(@"每日陪伴时间", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion6Cell4.Jh_placeholder = @"请选择每日陪伴时间";
    setion6Cell4.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr6 addObjectsFromArray: @[setion6Cell4]];
    setion6Cell4.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        NSArray *dataSources = @[@[@"00:00", @"01:00", @"02:00", @"03:00", @"04:00", @"05:00", @"06:00", @"07:00", @"08:00", @"09:00", @"10:00", @"11:00", @"12:00", @"13:00", @"14:00", @"15:00", @"16:00", @"17:00", @"18:00", @"19:00", @"20:00", @"21:00", @"22:00", @"23:00", @"24:00"], @[@"00:00", @"01:00", @"02:00", @"03:00", @"04:00", @"05:00", @"06:00", @"07:00", @"08:00", @"09:00", @"10:00", @"11:00", @"12:00", @"13:00", @"14:00", @"15:00", @"16:00", @"17:00", @"18:00", @"19:00", @"20:00", @"21:00", @"22:00", @"23:00", @"24:00"]];
        NSArray *defaultSelValueArr = @[@"01:00"];
        [CGXPickerView showStringPickerWithTitle:@"每日陪伴时间" DataSource:dataSources DefaultSelValue:defaultSelValueArr IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info = [NSString stringWithFormat:@"%@ - %@",selectValue[0],selectValue[1]];
            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 陪伴内容和形式
    JhFormCellModel *setion6Cell5 = JhFormCellModel_Add(@"陪伴内容和形式", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion6Cell5.Jh_placeholder = @"请选择陪伴内容和形式";
    setion6Cell5.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr6 addObjectsFromArray: @[setion6Cell5]];
//    setion6Cell5.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
//        [CGXPickerView showStringPickerWithTitle:@"陪伴内容和形式" DataSource:@[@"听英文儿歌",@"看英文动画片",@"读过英文绘本",@"读英文分级读物",@"在家说英语",@"做亲子英文游戏",@"其他"] DefaultSelValue:@"听英文儿歌" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
//            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
//            cellModel.Jh_info = selectValue;
//
//            [weakSelf.Jh_formTableView reloadData];
//        }];
//    };
    
    JhFormSectionModel *section6 = JhSectionModel_Add(cellArr6);
    
    JhBaseHeaderView *headerV6 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV6.backgroundColor = BaseBgWhiteColor;
    headerV6.Jh_leftTitle = @"实施OLOP的主要负责人信息(选填)";
    headerV6.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section6.Jh_headerView = headerV6;
    section6.Jh_headerHeight= headerV6.bounds.size.height;
    headerV6.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV6.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    // 第八组 -----------------------------
    
    //饮食
    NSMutableArray *cellArr7 = [NSMutableArray array];
    
    JhFormCellModel *setion7Cell0 = JhFormCellModel_Add(@"饮食", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell0.Jh_placeholder = @"爸爸/妈妈/其他";
    setion7Cell0.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell0]];
    setion7Cell0.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"饮食" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 睡眠
    JhFormCellModel *setion7Cell1 = JhFormCellModel_Add(@"睡眠", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell1.Jh_placeholder = @"爸爸/妈妈/爷爷";
    setion7Cell1.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell1]];
    setion7Cell1.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
//        [CGXPickerView showStringPickerWithTitle:@"睡眠" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
//            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
//            cellModel.Jh_info = selectValue;
//
//            [weakSelf.Jh_formTableView reloadData];
//        }];

        VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"睡眠" withDataArray:@[@(1),@(2)].mutableCopy withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy];
        [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
        [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(@0);
        }];
        biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {

            cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
            cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
            [biepersonView cancelDownView];
            [weakSelf.Jh_formTableView reloadData];
        };
    };
    // 读书
    JhFormCellModel *setion7Cell2 = JhFormCellModel_Add(@"读书", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell2.Jh_placeholder = @"爷爷/奶奶/姥姥/姥爷/其他";
    setion7Cell2.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell2]];
    setion7Cell2.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"读书" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 在家陪伴
    JhFormCellModel *setion7Cell3 = JhFormCellModel_Add(@"在家陪伴", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell3.Jh_placeholder = @"爷爷/奶奶/姥姥/姥爷/其他";
    setion7Cell3.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell3]];
    setion7Cell3.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"在家陪伴" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;
            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 外出陪伴
    JhFormCellModel *setion7Cell4 = JhFormCellModel_Add(@"外出陪伴", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell4.Jh_placeholder = @"爸爸/妈妈/爷爷/奶奶";
    setion7Cell4.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell4]];
    setion7Cell4.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"外出陪伴" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    // 纪律
    JhFormCellModel *setion7Cell5 = JhFormCellModel_Add(@"纪律", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell5.Jh_placeholder = @"爸爸/奶奶/姥姥/姥爷/其他";
    setion7Cell5.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell5]];
    setion7Cell5.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"纪律" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    
    // 基本不参与教养
    JhFormCellModel *setion7Cell6 = JhFormCellModel_Add(@"基本不参与教养", @"", JhFormCellTypeSelect, YES, YES, UIKeyboardTypeDefault);
    setion7Cell6.Jh_placeholder = @"爷爷/奶奶/姥姥/姥爷/其他";
    setion7Cell6.Jh_InfoTextAlignment = JhFormCellInfoTextAlignmentRight;
    [cellArr7 addObjectsFromArray: @[setion7Cell6]];
    setion7Cell6.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
        [CGXPickerView showStringPickerWithTitle:@"基本不参与教养" DataSource:@[@"爸爸",@"妈妈",@"爷爷",@"姥姥",@"姥爷",@"其他"] DefaultSelValue:@"爸爸" IsAutoSelect:NO Manager:nil ResultBlock:^(id selectValue, id selectRow) {
            cellModel.Jh_info_idStr = [NSString stringWithFormat:@"%ld",[selectRow integerValue] + 1];
            cellModel.Jh_info = selectValue;

            [weakSelf.Jh_formTableView reloadData];
        }];
    };
    
    
    JhFormSectionModel *section7 = JhSectionModel_Add(cellArr7);
    
    JhBaseHeaderView *headerV7 = [[JhBaseHeaderView alloc] initWithFrame:CGRectMake(0, 0, Kwidth, 44)];
    headerV7.backgroundColor = BaseBgWhiteColor;
    headerV7.Jh_leftTitle = @"家庭成员在养育孩子工作中的分工(选填)";
    headerV7.lineView.backgroundColor = [UIColor cz_colorWithRed:238 green:81 blue:39];
    section7.Jh_headerView = headerV7;
    section7.Jh_headerHeight= headerV7.bounds.size.height;
    headerV7.backgroundColor = [UIColor cz_colorWithRed:242 green:242 blue:242];
    headerV7.Jh_leftTitleLabel.textColor = [UIColor cz_colorWithRed:52 green:52 blue:52];
    
    
    [self.Jh_formModelArr addObject:section0];
    [self.Jh_formModelArr addObject:section1];
    [self.Jh_formModelArr addObject:section2];
    [self.Jh_formModelArr addObject:section3];
    [self.Jh_formModelArr addObject:section4];
    [self.Jh_formModelArr addObject:section5];
    [self.Jh_formModelArr addObject:section6];
    [self.Jh_formModelArr addObject:section7];
    
    
    // 查询个人档案
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:weakSelf.view animated:YES];
    hud.labelText = @"正在加载...";
    [hud show:YES];
    
    [WYHXNetWorkService netWorkSerViceRequestWithGetUrl:WKStudyMyQueryMyUserInfo withPostParams:@{@"token":[UserModel getUserModel].token}.mutableCopy withBlock:^(NSDictionary *result, NSError *error) {
        hud.hidden = YES;
        if ([result[@"code"]integerValue] == 200) {
//            [MBProgressHUD showSuccess:@"加载成功" toView:weakSelf.view];
            VKMainPersonModel *model = [VKMainPersonModel mj_objectWithKeyValues:result[@"data"]];
            
            
            // 主要联系人
            if ([model.mainRelationUsername isEqual:[NSNull null]]) {
                setion1Cell0.Jh_info = @"";
            }else{
                setion1Cell0.Jh_info = model.mainRelationUsername;
            }
//            @"mainRelationTel":setion1Cell1.Jh_info,
            if ([model.mainRelationTel isEqual:[NSNull null]]) {
                setion1Cell1.Jh_info = @"";
            }else{
                setion1Cell1.Jh_info = model.mainRelationTel;
            }
//            @"mainRelationQq":setion1Cell2.Jh_info,
            if ([model.mainRelationQq isEqual:[NSNull null]]) {
                setion1Cell2.Jh_info = @"";
            }else{
                setion1Cell2.Jh_info = model.mainRelationQq;
            }
//            @"mainRelationWx":setion1Cell3.Jh_info,
            if ([model.mainRelationWx isEqual:[NSNull null]]) {
                setion1Cell3.Jh_info = @"";
            }else{
                setion1Cell3.Jh_info = model.mainRelationWx;
            }
//            @"mainRelationEmail":setion1Cell4.Jh_info,
            if ([model.mainRelationEmail isEqual:[NSNull null]]) {
                setion1Cell4.Jh_info = @"";
            }else{
                setion1Cell4.Jh_info = model.mainRelationEmail;
            }
//            @"mainRelationAddress":setion1Cell5.Jh_info,
            if ([model.mainRelationAddress isEqual:[NSNull null]]) {
                setion1Cell5.Jh_info = @"";
            }else{
                setion1Cell5.Jh_info = model.mainRelationAddress;
            }
//            @"mainRelationAge":setion1Cell6.Jh_info,
            if ([model.mainRelationAge isEqual:[NSNull null]]) {
                setion1Cell6.Jh_info = @"";
            }else{
                setion1Cell6.Jh_info = model.mainRelationAge;
            }
#pragma mainRelationRelate  与主要联系人关系 1 父亲 2 母亲
//            @"mainRelationRelate":setion1Cell7.Jh_info_idStr,
            if ([model.mainRelationRelate isEqual:[NSNull null]]) {
                setion1Cell7.Jh_info = @"";
            }else{
                if ([model.mainRelationRelate integerValue] == 1) {
                    setion1Cell7.Jh_info = @"父亲";
                    setion1Cell7.Jh_info_idStr = @"1";
                }else if ([model.mainRelationRelate integerValue] == 2){
                    setion1Cell7.Jh_info = @"母亲";
                    setion1Cell7.Jh_info_idStr = @"2";
                }
                
            }
#pragma mainRelationEducat  主要联系人学历 1,高中 2,大专 3,本科 4,研究生 5,博士 6,教授 7,其它
//            @"mainRelationEducat":setion1Cell9.Jh_info_idStr,
            if ([model.mainRelationEducat isEqual:[NSNull null]]) {
                setion1Cell9.Jh_info = @"";
            }else{
                if ([model.mainRelationEducat integerValue] == 1) {
                    setion1Cell9.Jh_info = @"高中";
                    setion1Cell9.Jh_info_idStr = @"1";
                }else if ([model.mainRelationEducat integerValue] == 2){
                    setion1Cell9.Jh_info = @"大专";
                    setion1Cell9.Jh_info_idStr = @"2";
                }else if ([model.mainRelationEducat integerValue] == 3){
                    setion1Cell9.Jh_info = @"本科";
                    setion1Cell9.Jh_info_idStr = @"3";
                }else if ([model.mainRelationEducat integerValue] == 4){
                    setion1Cell9.Jh_info = @"研究生";
                    setion1Cell9.Jh_info_idStr = @"4";
                }else if ([model.mainRelationEducat integerValue] == 5){
                    setion1Cell9.Jh_info = @"博士";
                    setion1Cell9.Jh_info_idStr = @"5";
                }else if ([model.mainRelationEducat integerValue] == 6){
                    setion1Cell9.Jh_info = @"教授";
                    setion1Cell9.Jh_info_idStr = @"6";
                }else if ([model.mainRelationEducat integerValue] == 7){
                    setion1Cell9.Jh_info = @"其他";
                    setion1Cell9.Jh_info_idStr = @"7";
                }
            }
#pragma 判断  mainRelationProfission  1,英语教师 2,翻译 3,外交官 4,对外贸易 5,其它
//            @"mainRelationProfission":setion1Cell10.Jh_info_idStr,
            if ([model.mainRelationProfission isEqual:[NSNull null]]) {
                setion1Cell10.Jh_info = @"";
                NSLog(@"Jh_info_idStr= %@ Jh_info= %@",setion1Cell10.Jh_info_idStr,setion1Cell10.Jh_info);
            }else{
                if ([model.mainRelationProfission integerValue] == 1) {
                    setion1Cell10.Jh_info = @"英语教师";
                    setion1Cell10.Jh_info_idStr = @"1";
                }else if ([model.mainRelationProfission integerValue] == 2){
                    setion1Cell10.Jh_info = @"翻译";
                    setion1Cell10.Jh_info_idStr = @"2";
                }else if ([model.mainRelationProfission integerValue] == 3){
                    setion1Cell10.Jh_info = @"外交官";
                    setion1Cell10.Jh_info_idStr = @"3";
                }else if ([model.mainRelationProfission integerValue] == 4){
                    setion1Cell10.Jh_info = @"对外贸易";
                    setion1Cell10.Jh_info_idStr = @"4";
                }else if ([model.mainRelationProfission integerValue] == 5){
                    setion1Cell10.Jh_info = @"医生";
                    setion1Cell10.Jh_info_idStr = @"5";
                }else if ([model.mainRelationProfission integerValue] == 6){
                    setion1Cell10.Jh_info = @"律师";
                    setion1Cell10.Jh_info_idStr = @"6";
                }else if ([model.mainRelationProfission integerValue] == 7){
                    setion1Cell10.Jh_info = @"行政";
                    setion1Cell10.Jh_info_idStr = @"7";
                }else if ([model.mainRelationProfission integerValue] == 8){
                    setion1Cell10.Jh_info = @"餐饮业";
                    setion1Cell10.Jh_info_idStr = @"8";
                }else if ([model.mainRelationProfission integerValue] == 9){
                    setion1Cell10.Jh_info = @"服务业";
                    setion1Cell10.Jh_info_idStr = @"9";
                }else if ([model.mainRelationProfission integerValue] == 10){
                    setion1Cell10.Jh_info = @"其他";
                    setion1Cell10.Jh_info_idStr = @"10";
                }
//                setion1Cell10.Jh_info = model.mainRelationProfission;
            NSLog(@"Jh_info_idStr= %@ Jh_info= %@",setion1Cell10.Jh_info_idStr,setion1Cell10.Jh_info);
            }
#pragma 判断  bringProblem   bringProblemSelect   养育中的主要困难选项 1，隔辈溺爱 2，爸爸工作很忙 3，妈妈工作很忙 4，缺乏教育和管理孩子的方式
            //  @"bringProblemSelect":@"", // 养育中的难题

            if ([model.bringProblemSelect isEqual:[NSNull null]]) {
                footerV.dataArray = @[].mutableCopy;
            }else{
                if ([model.bringProblemSelect containsString:@","]) {
                    NSArray *comArray = [model.bringProblemSelect componentsSeparatedByString:@","];
                    NSMutableArray *data = [[NSMutableArray alloc]init];
                    for (NSString *str in comArray) {
                        [data addObject:@([str integerValue])];
                    }
                    footerV.dataArray = data;
                }else{
                    if ([model.bringProblemSelect integerValue] == 1) {
                        footerV.dataArray = @[@1].mutableCopy;
                    }else if ([model.bringProblemSelect integerValue] == 2){
                        footerV.dataArray = @[@2].mutableCopy;
                    }else if ([model.bringProblemSelect integerValue] == 3){
                        footerV.dataArray = @[@3].mutableCopy;
                    }else if ([model.bringProblemSelect integerValue] == 4){
                        footerV.dataArray = @[@4].mutableCopy;
                    }
                }
                
                
            
                
//                footerV.textView.text = model.bringProblem;
            }
            //  @"bringProblem":@"养育中的难题", // 养育中的难题
            if ([model.bringProblem isEqual:[NSNull null]]) {
                footerV.textView.text = @"";
            }else{
                footerV.textView.text = model.bringProblem;
            }
//            @"babyUsername":setion0Cell0.Jh_info, // 儿童基本信息
            if ([model.babyUsername isEqual:[NSNull null]]) {
                setion0Cell0.Jh_info = @"";
            }else{
                setion0Cell0.Jh_info = model.babyUsername;
            }
//            @"babyNickname":setion0Cell1.Jh_info,
            if ([model.babyNickname isEqual:[NSNull null]]) {
                setion0Cell1.Jh_info = @"";
            }else{
                setion0Cell1.Jh_info = model.babyNickname;
            }
//            @"babyEnName":setion0Cell2.Jh_info,
            if ([model.babyEnName isEqual:[NSNull null]]) {
                setion0Cell2.Jh_info = @"";
            }else{
                setion0Cell2.Jh_info = model.babyEnName;
            }
#pragma babySex   幼儿性别 0 女 1 男
//            @"babySex":[setion0Cell3.Jh_info isEqualToString:@"女"] ? @"0":@"1",
            if ([model.babySex isEqual:[NSNull null]]) {
                setion0Cell3.Jh_info = @"";
            }else{
                if ([model.babySex integerValue] == 0) {
                    setion0Cell3.Jh_info = @"女";
                    setion0Cell3.Jh_info_idStr = @"0";
                }else if ([model.babySex integerValue] == 1){
                    setion0Cell3.Jh_info = @"男";
                    setion0Cell3.Jh_info_idStr = @"1";
                }
//                setion0Cell3.Jh_info = model.babySex;
            }
//            @"babyBirthday":setion0Cell4.Jh_info,
            if ([model.babyBirthday isEqual:[NSNull null]]) {
                setion0Cell4.Jh_info = @"";
            }else{
                NSString *bady = [model.babyBirthday substringToIndex:10];
            
                setion0Cell4.Jh_info = bady;
            }
//            @"babyCity":setion0Cell5.Jh_info,
            if ([model.babyCity isEqual:[NSNull null]]) {
                setion0Cell5.Jh_info = @"";
            }else{
                setion0Cell5.Jh_info = model.babyCity;
            }
#pragma babySister   幼儿兄弟姐妹 1,哥哥 2,弟弟 3,姐姐 4,妹妹 多选  以逗号分隔
//            @"babySister":setion0Cell6.Jh_info_idStr,
            if ([model.babySister isEqual:[NSNull null]]||model.babySister==nil) {
                setion0Cell6.Jh_info = @"";
            }else{
                NSMutableArray *idArray = [[NSMutableArray alloc]init];
                if ([model.babySister containsString:@","]) {
                    idArray = [model.babySister componentsSeparatedByString:@","].mutableCopy;
                }else{
                    [idArray addObject:model.babySister];
                }
                setion0Cell6.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    
                    VKMePersonView *personView = [[VKMePersonView alloc]initWithTitle:@"选择兄弟姐妹" withDataArray:idArray withTitleArray:@[@"哥哥",@"弟弟",@"姐姐",@"妹妹",@"无"].mutableCopy];
                    [[UIApplication sharedApplication].keyWindow addSubview:personView];
                    [personView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    personView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {

                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [personView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.babySister containsString:@","]) {
                    
                    setion0Cell6.Jh_info_idStr = model.babySister;
                    
                    NSMutableArray *array = @[@"哥哥",@"弟弟",@"姐姐",@"妹妹",@"无"].mutableCopy;
                    NSMutableArray *idarray = [model.babySister componentsSeparatedByString:@","].mutableCopy;//@[@"0",@"5"]
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
//                            i=idarray.count-1;
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }

                    }

                    setion0Cell6.Jh_info = str;
                    
                }else{
                    if ([model.babySister integerValue] == 1) {
                        setion0Cell6.Jh_info = @"哥哥";
                        setion0Cell6.Jh_info_idStr = @"1";
                    }else if ([model.babySister integerValue] == 2){
                        setion0Cell6.Jh_info = @"弟弟";
                        setion0Cell6.Jh_info_idStr = @"2";
                    }else if ([model.babySister integerValue] == 3){
                        setion0Cell6.Jh_info = @"姐姐";
                        setion0Cell6.Jh_info_idStr = @"3";
                    }else if ([model.babySister integerValue] == 4){
                        setion0Cell6.Jh_info = @"妹妹";
                        setion0Cell6.Jh_info_idStr = @"4";
                    }else if ([model.babySister integerValue] == 5){
                        setion0Cell6.Jh_info = @"无";
                        setion0Cell6.Jh_info_idStr = @"5";
                        
                    }
                }
                
                
                
//                setion0Cell6.Jh_info = model.babySister;
            }
#pragma liveLaw   作息是否规律 1,是 2,否
//            @"liveLaw": setion4Cell0.Jh_info_idStr == nil ?@"":setion4Cell0.Jh_info_idStr,// 生活习惯描述
            if ([model.liveLaw isEqual:[NSNull null]]) {
                setion4Cell0.Jh_info = @"";
            }else{
                if ([model.liveLaw integerValue] == 1) {
                    setion4Cell0.Jh_info = @"是";
                    setion4Cell0.Jh_info_idStr = @"1";
                }else if ([model.liveLaw integerValue] == 2){
                    setion4Cell0.Jh_info = @"否";
                    setion4Cell0.Jh_info_idStr = @"2";
                }
//                setion4Cell0.Jh_info = model.liveLaw;
            }
#pragma sleepCase      入睡情况 1,良好 2,有困难
//            @"sleepCase":setion4Cell1.Jh_info_idStr == nil ?@"":setion4Cell1.Jh_info_idStr,
            if ([model.sleepCase isEqual:[NSNull null]]) {
                setion4Cell1.Jh_info = @"";
            }else{
                if ([model.sleepCase integerValue] == 1) {
                    setion4Cell1.Jh_info = @"良好";
                    setion4Cell1.Jh_info_idStr = @"1";
                }else if ([model.sleepCase integerValue] == 2){
                    setion4Cell1.Jh_info = @"有困难";
                    setion4Cell1.Jh_info_idStr = @"2";
                }
//                setion4Cell1.Jh_info = model.sleepCase;
            }
#pragma sleepQuality   睡眠质量 1,良好 2,一般 3,差
//            @"sleepQuality":setion4Cell2.Jh_info_idStr == nil ?@"":setion4Cell2.Jh_info_idStr,
            if ([model.sleepQuality isEqual:[NSNull null]]) {
                setion4Cell2.Jh_info = @"";
            }else{
                if ([model.sleepQuality integerValue] == 1) {
                    setion4Cell2.Jh_info = @"良好";
                    setion4Cell2.Jh_info_idStr = @"1";
                }else if ([model.sleepQuality integerValue] == 2){
                    setion4Cell2.Jh_info = @"一般";
                    setion4Cell2.Jh_info_idStr = @"2";
                }else if ([model.sleepQuality integerValue] == 3){
                    setion4Cell2.Jh_info = @"差";
                    setion4Cell2.Jh_info_idStr = @"3";
                }
//                setion4Cell2.Jh_info = model.sleepQuality;
            }
//            @"sleepStartTime":@"01:00",
            if ([model.sleepStartTime isEqual:[NSNull null]]) {
                setion4Cell3.Jh_info = @"";
            }else{
                setion4Cell3.Jh_info = model.sleepStartTime;
            }
//            @"sleepEndTime":@"02:20",
            if ([model.sleepEndTime isEqual:[NSNull null]]) {
                setion4Cell3.Jh_info = @"";
            }else{
                setion4Cell3.Jh_info = model.sleepEndTime;
            }
            if (model.sleepStartTime.length) {
                setion4Cell3.Jh_info = [NSString stringWithFormat:@"%@ - %@",model.sleepStartTime,model.sleepEndTime];
            }
#pragma dietaryHabit  饮食习惯 1,不偏食 2,偏菜类 3,偏肉类 4,偏零食
//            @"dietaryHabit":setion4Cell4.Jh_info_idStr == nil ?@"":setion4Cell4.Jh_info_idStr,
            if ([model.dietaryHabit isEqual:[NSNull null]]) {
                setion4Cell4.Jh_info = @"";
            }else{
                if ([model.dietaryHabit integerValue] == 1) {
                    setion4Cell4.Jh_info = @"不偏食";
                    setion4Cell4.Jh_info_idStr = @"1";
                }else if ([model.dietaryHabit integerValue] == 2){
                    setion4Cell4.Jh_info = @"偏菜类";
                    setion4Cell4.Jh_info_idStr = @"2";
                }else if ([model.dietaryHabit integerValue] == 3){
                    setion4Cell4.Jh_info = @"偏肉类";
                    setion4Cell4.Jh_info_idStr = @"3";
                }else if ([model.dietaryHabit integerValue] == 4){
                    setion4Cell4.Jh_info = @"偏零食";
                    setion4Cell4.Jh_info_idStr = @"4";
                }
//                setion4Cell4.Jh_info = model.dietaryHabit;
            }
//            @"healthCase":@"健康状况描述", // 健康状况描述
            if ([model.healthCase isEqual:[NSNull null]]) {
                contactView.textView.text = @"";
            }else{
                contactView.textView.text = model.healthCase;
            }
#pragma socialAndInterest   社交能力与兴趣描述 1 讲道理 2 很少哭闹 3 急躁 4,耍赖皮 5,说话算数 6,界限不清 7,喜欢去上学 8,喜欢去游乐场 9,喜欢画画 10,喜欢听音乐 11,喜爱手工 12,喜爱阅读 13,社交能力强 14 ,有自己的好朋友 15,乐于分享
//            @"socialAndInterest":@"1",// 社交能力与兴趣描述
            if ([model.socialAndInterest isEqual:[NSNull null]]) {
                setion1Cell0.Jh_info = @"";
            }else{
                if ([model.socialAndInterest containsString:@","]) {
                    NSArray *comArray = [model.socialAndInterest componentsSeparatedByString:@","];
                    NSMutableArray *data = [[NSMutableArray alloc]init];
                    for (NSString *str in comArray) {
                        [data addObject:@([str integerValue])];
                    }
                    gridView.dataArray = data;
                }else{
                    if ([model.socialAndInterest integerValue] == 1) {
//                        setion1Cell0.Jh_info = @"讲道理";
//                        setion1Cell0.Jh_info_idStr = @"1";
                        [gridView.dataArray addObject:@1];
                    }else if ([model.socialAndInterest integerValue] == 2){
//                        setion1Cell0.Jh_info = @"很少哭闹";
//                        setion1Cell0.Jh_info_idStr = @"2";
                        [gridView.dataArray addObject:@2];
                    }else if ([model.socialAndInterest integerValue] == 3){
//                        setion1Cell0.Jh_info = @"急躁";
//                        setion1Cell0.Jh_info_idStr = @"3";
                        [gridView.dataArray addObject:@3];
                    }else if ([model.socialAndInterest integerValue] == 4){
//                        setion1Cell0.Jh_info = @"耍赖皮";
//                        setion1Cell0.Jh_info_idStr = @"4";
                        [gridView.dataArray addObject:@4];
                    }else if ([model.socialAndInterest integerValue] == 5){
//                        setion1Cell0.Jh_info = @"说话算数";
//                        setion1Cell0.Jh_info_idStr = @"5";
                        [gridView.dataArray addObject:@5];
                    }else if ([model.socialAndInterest integerValue] == 6){
//                        setion1Cell0.Jh_info = @"界限不清";
//                        setion1Cell0.Jh_info_idStr = @"6";
                        [gridView.dataArray addObject:@6];
                    }else if ([model.socialAndInterest integerValue] == 7){
//                        setion1Cell0.Jh_info = @"喜欢去上学";
//                        setion1Cell0.Jh_info_idStr = @"7";
                        [gridView.dataArray addObject:@7];
                    }else if ([model.socialAndInterest integerValue] == 8){
//                        setion1Cell0.Jh_info = @"喜欢去游乐场";
//                        setion1Cell0.Jh_info_idStr = @"8";
                        [gridView.dataArray addObject:@8];
                    }else if ([model.socialAndInterest integerValue] == 9){
//                        setion1Cell0.Jh_info = @"喜欢画画";
//                        setion1Cell0.Jh_info_idStr = @"9";
                        [gridView.dataArray addObject:@9];
                    }else if ([model.socialAndInterest integerValue] == 10){
//                        setion1Cell0.Jh_info = @"喜欢听音乐";
//                        setion1Cell0.Jh_info_idStr = @"10";
                        [gridView.dataArray addObject:@10];
                    }else if ([model.socialAndInterest integerValue] == 11){
//                        setion1Cell0.Jh_info = @"喜爱手工";
//                        setion1Cell0.Jh_info_idStr = @"11";
                        [gridView.dataArray addObject:@11];
                    }else if ([model.socialAndInterest integerValue] == 12){
//                        setion1Cell0.Jh_info = @"喜爱阅读";
//                        setion1Cell0.Jh_info_idStr = @"12";
                        [gridView.dataArray addObject:@12];
                    }else if ([model.socialAndInterest integerValue] == 13){
//                        setion1Cell0.Jh_info = @"社交能力强";
//                        setion1Cell0.Jh_info_idStr = @"13";
                        [gridView.dataArray addObject:@13];
                    }else if ([model.socialAndInterest integerValue] == 14){
//                        setion1Cell0.Jh_info = @"有自己的好朋友";
//                        setion1Cell0.Jh_info_idStr = @"14";
                        [gridView.dataArray addObject:@14];
                    }else if ([model.socialAndInterest integerValue] == 15){
//                        setion1Cell0.Jh_info = @"乐于分享";
//                        setion1Cell0.Jh_info_idStr = @"15";
                        [gridView.dataArray addObject:@15];
                    }
                }
                
                
//                setion1Cell0.Jh_info = model.socialAndInterest;
            }
//            @"otherRelationName":setion2Cell0.Jh_info, //  其他联系人
            if ([model.otherRelationName isEqual:[NSNull null]]) {
                setion2Cell0.Jh_info = @"";
            }else{
                setion2Cell0.Jh_info = model.otherRelationName;
            }
//            @"otherRelationAge":setion2Cell1.Jh_info,
            if ([model.otherRelationAge isEqual:[NSNull null]]) {
                setion2Cell1.Jh_info = @"";
            }else{
                setion2Cell1.Jh_info = model.otherRelationAge;
            }
#pragma otherRelation   与其他联系人关系 1 父亲 2 母亲
//            @"otherRelation":setion2Cell2.Jh_info_idStr,
            if ([model.otherRelation isEqual:[NSNull null]]) {
                setion2Cell2.Jh_info = @"";
            }else{
                if ([model.otherRelation integerValue] == 1) {
                    setion2Cell2.Jh_info = @"父亲";
                    setion2Cell2.Jh_info_idStr = @"1";
                }else if ([model.otherRelation integerValue] == 2){
                    setion2Cell2.Jh_info = @"母亲";
                    setion2Cell2.Jh_info_idStr = @"2";
                }
//                setion2Cell2.Jh_info = model.otherRelation;
            }
#pragma otherRelationEducat   其他联系人 1,高中 2,大专 3,本科 4,研究生 5,博士 6,教授 7,其它
//            @"otherRelationEducat":setion2Cell3.Jh_info_idStr,
            if ([model.otherRelationEducat isEqual:[NSNull null]]) {
                setion2Cell3.Jh_info = @"";
            }else{
                if ([model.otherRelation integerValue] == 1) {
                    setion2Cell3.Jh_info = @"高中";
                    setion2Cell3.Jh_info_idStr = @"1";
                }else if ([model.otherRelation integerValue] == 2){
                    setion2Cell3.Jh_info = @"大专";
                    setion2Cell3.Jh_info_idStr = @"2";
                }else if ([model.otherRelation integerValue] == 3){
                    setion2Cell3.Jh_info = @"本科";
                    setion2Cell3.Jh_info_idStr = @"3";
                }else if ([model.otherRelation integerValue] == 4){
                    setion2Cell3.Jh_info = @"研究生";
                    setion2Cell3.Jh_info_idStr = @"4";
                }else if ([model.otherRelation integerValue] == 5){
                    setion2Cell3.Jh_info = @"博士";
                    setion2Cell3.Jh_info_idStr = @"5";
                }else if ([model.otherRelation integerValue] == 6){
                    setion2Cell3.Jh_info = @"教授";
                    setion2Cell3.Jh_info_idStr = @"6";
                }else if ([model.otherRelation integerValue] == 7){
                    setion2Cell3.Jh_info = @"其他";
                    setion2Cell3.Jh_info_idStr = @"7";
                }
//                setion2Cell3.Jh_info = model.otherRelationEducat;
            }
//第一个职业 大烧开后嘎哈的嘎哈
#pragma otherRelationProfission   其他联系人 1,英语教师 2,翻译 3,外交官 4,对外贸易 5,其它
//            @"otherRelationProfission":setion2Cell4.Jh_info_idStr,
            if ([model.otherRelationProfission isEqual:[NSNull null]]) {
                setion2Cell4.Jh_info = @"";
            }else{
                if ([model.otherRelationProfission integerValue] == 1) {
                    setion2Cell4.Jh_info = @"英语教师";
                    setion2Cell4.Jh_info_idStr = @"1";
                }else if ([model.otherRelationProfission integerValue] == 2){
                    setion2Cell4.Jh_info = @"翻译";
                    setion2Cell4.Jh_info_idStr = @"2";
                }else if ([model.otherRelationProfission integerValue] == 3){
                    setion2Cell4.Jh_info = @"外交官";
                    setion2Cell4.Jh_info_idStr = @"3";
                }else if ([model.otherRelationProfission integerValue] == 4){
                    setion2Cell4.Jh_info = @"对外贸易";
                    setion2Cell4.Jh_info_idStr = @"4";
                }else if ([model.otherRelationProfission integerValue] == 5){
                    setion2Cell4.Jh_info = @"医生";
                    setion2Cell4.Jh_info_idStr = @"5";
                }else if ([model.otherRelationProfission integerValue] == 6){
                    setion2Cell4.Jh_info = @"律师";
                    setion2Cell4.Jh_info_idStr = @"6";
                }else if ([model.otherRelationProfission integerValue] == 7){
                    setion2Cell4.Jh_info = @"行政";
                    setion2Cell4.Jh_info_idStr = @"7";
                }else if ([model.otherRelationProfission integerValue] == 8){
                    setion2Cell4.Jh_info = @"餐饮业";
                    setion2Cell4.Jh_info_idStr = @"8";
                }else if ([model.otherRelationProfission integerValue] == 9){
                    setion2Cell4.Jh_info = @"服务业";
                    setion2Cell4.Jh_info_idStr = @"9";
                }else if ([model.otherRelationProfission integerValue] == 10){
                    setion2Cell4.Jh_info = @"其他";
                    setion2Cell4.Jh_info_idStr = @"10";
                }
                NSLog(@"Jh_info_idStr= %@ Jh_info= %@",setion2Cell4.Jh_info_idStr,setion2Cell4.Jh_info);
//                setion2Cell4.Jh_info = model.otherRelationProfission;
            }
//            @"companionName":setion6Cell0.Jh_info_idStr == nil?@"":setion6Cell0.Jh_info_idStr,
//            if ([model.companionName isEqual:[NSNull null]]) {
//                setion6Cell0.Jh_info = @"";
//            }else{
//                setion6Cell0.Jh_info = model.companionName;
//            }
            if ([model.companionName isEqual:[NSNull null]]) {
                setion6Cell0.Jh_info = @"";

            }else{
                if ([model.companionName integerValue] == 1) {
                    setion6Cell0.Jh_info = @"爷爷";
                    setion6Cell0.Jh_info_idStr = @"1";
                }else if ([model.companionName integerValue] == 2) {
                    setion6Cell0.Jh_info = @"奶奶";
                    setion6Cell0.Jh_info_idStr = @"2";
                }else if ([model.companionName integerValue] == 3) {
                    setion6Cell0.Jh_info = @"姥姥";
                    setion6Cell0.Jh_info_idStr = @"3";
                }else if ([model.companionName integerValue] == 4) {
                    setion6Cell0.Jh_info = @"姥爷";
                    setion6Cell0.Jh_info_idStr = @"4";
                }else if ([model.companionName integerValue] == 5) {
                    setion6Cell0.Jh_info = @"其他";
                    setion6Cell0.Jh_info_idStr = @"5";
                }
            }
            
            // 实施的主要负责人信息
#pragma companionEnglishGrade       英语程度 1,CET-4 2,CET-6 3,TEM-4 4,TEM-8 5,IELTS 6,TOFEL
//            @"companionEnglishGrade":setion6Cell1.Jh_info_idStr == nil?@"":setion6Cell1.Jh_info_idStr,
            if ([model.companionEnglishGrade isEqual:[NSNull null]]) {
                setion6Cell1.Jh_info = @"";
            }else{
                if ([model.companionEnglishGrade integerValue] == 1) {
                    setion6Cell1.Jh_info = @"CET-4";
                    setion6Cell1.Jh_info_idStr = @"1";
                }else if ([model.companionEnglishGrade integerValue] == 2){
                    setion6Cell1.Jh_info = @"CET-6";
                    setion6Cell1.Jh_info_idStr = @"2";
                }else if ([model.companionEnglishGrade integerValue] == 3){
                    setion6Cell1.Jh_info = @"TEM-4";
                    setion6Cell1.Jh_info_idStr = @"3";
                }else if ([model.companionEnglishGrade integerValue] == 4){
                    setion6Cell1.Jh_info = @"TEM-8";
                    setion6Cell1.Jh_info_idStr = @"4";
                }else if ([model.companionEnglishGrade integerValue] == 5){
                    setion6Cell1.Jh_info = @"IELTS";
                    setion6Cell1.Jh_info_idStr = @"5";
                }else if ([model.companionEnglishGrade integerValue] == 6){
                    setion6Cell1.Jh_info = @"TOFEL";
                    setion6Cell1.Jh_info_idStr = @"6";
                }
//                setion6Cell1.Jh_info = model.companionEnglishGrade;
            }
#pragma companionTongueGrade   口语水平 1,生活和工作中从不使用英语 2,生活能够用简单英语交流 3,生活和工作中能够用英文流利沟通
//            dashgkahglha
            /**
             @"生活和工作中从不使用英语",@"生活能够用简单英语交流 ",@"生活和工作中能够用英文流利沟通 ",@"能够从事涉外公务活动和英语口语翻译工作"
             */
//            @"companionTongueGrade":setion6Cell2.Jh_info_idStr == nil?@"":setion6Cell2.Jh_info_idStr,
            if ([model.companionTongueGrade isEqual:[NSNull null]]) {
                setion6Cell2.Jh_info = @"";
            }else{
                if ([model.companionTongueGrade integerValue] == 1) {
                    setion6Cell2.Jh_info = @"生活和工作中从不使用英语";
                    setion6Cell2.Jh_info_idStr = @"1";
                }else if ([model.companionTongueGrade integerValue] == 2){
                    setion6Cell2.Jh_info = @"生活能够用简单英语交流";
                    setion6Cell2.Jh_info_idStr = @"2";
                }else if ([model.companionTongueGrade integerValue] == 3){
                    setion6Cell2.Jh_info = @"生活和工作中能够用英文流利沟通";
                    setion6Cell2.Jh_info_idStr = @"3";
                }else if ([model.companionTongueGrade integerValue] == 4){
                    setion6Cell2.Jh_info = @"能够从事涉外公务活动和英语口语翻译工作";
                    setion6Cell2.Jh_info_idStr = @"4";
                }
//                setion6Cell2.Jh_info = model.companionTongueGrade;
            }
#pragma companionEnglishAccent   英语口音 1,标准没音 2,标准英音 3,一般没音 4,一般英音 5,有口音
//            @"companionEnglishAccent":setion6Cell3.Jh_info_idStr == nil ?@"":setion6Cell3.Jh_info_idStr,
            if ([model.companionEnglishAccent isEqual:[NSNull null]]) {
                setion6Cell3.Jh_info = @"";
            }else{
                if ([model.companionEnglishAccent integerValue] == 1) {
                    setion6Cell3.Jh_info = @"标准美音";
                    setion6Cell3.Jh_info_idStr = @"1";
                }else if ([model.companionEnglishAccent integerValue] == 2){
                    setion6Cell3.Jh_info = @"标准英音";
                    setion6Cell3.Jh_info_idStr = @"2";
                }else if ([model.companionEnglishAccent integerValue] == 3){
                    setion6Cell3.Jh_info = @"一般美音";
                    setion6Cell3.Jh_info_idStr = @"3";
                }else if ([model.companionEnglishAccent integerValue] == 4){
                    setion6Cell3.Jh_info = @"一般英音";
                    setion6Cell3.Jh_info_idStr = @"4";
                }else if ([model.companionEnglishAccent integerValue] == 5){
                    setion6Cell3.Jh_info = @"有口音";
                    setion6Cell3.Jh_info_idStr = @"5";
                }
//                setion6Cell3.Jh_info = model.mainRelationUsername;
            }
//            @"companionStartTime":@"02:10",
            if ([model.companionStartTime isEqual:[NSNull null]]) {
                setion6Cell4.Jh_info = @"";
            }else{
                setion6Cell4.Jh_info = model.companionStartTime;
            }
//            @"companionEndTime":@"03:20",
            if ([model.companionEndTime isEqual:[NSNull null]]) {
                setion6Cell4.Jh_info = @"";
            }else{
                setion6Cell4.Jh_info = model.companionEndTime;
            }
            if (model.companionStartTime.length) {
                setion6Cell4.Jh_info = [NSString stringWithFormat:@"%@ - %@",model.companionStartTime,model.companionEndTime];
            }
#pragma companionType   陪伴内容和形式 多选 1,听英文儿歌 2,看英文动画 3,读过英文绘本 4,读英文分级读物 5,在家说英语 6,做亲子游戏 7,其它
//            @"companionType":setion6Cell5.Jh_info_idStr == nil ?@"":setion6Cell5.Jh_info_idStr,
            if ([model.companionType isEqual:[NSNull null]]) {
                setion6Cell5.Jh_info = @"";
            }else{
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.companionType containsString:@","]) {
                    daArray = [model.companionType componentsSeparatedByString:@","].mutableCopy;
                }else{
                    if ([model.companionType isEqualToString:@""]||model.companionType==nil) {
                        
                    }else{
                        [daArray addObject:model.companionType];
                    }
                }
                
                
                setion6Cell5.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMePeibanPersonView *biepersonView = [[VKMePeibanPersonView alloc]initWithTitle:@"请选择陪伴内容和形式" withDataArray:daArray withTitleArray:@[@"听英文儿歌",@"看英文动画片",@"读过英文绘本",@"读英文分级读物",@"在家说英语",@"做亲子英文游戏",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.companionType containsString:@","]) {
                    
                    setion6Cell5.Jh_info_idStr = model.companionType;
                    
                    NSMutableArray *array = @[@"听英文儿歌",@"看英文动画片",@"读过英文绘本",@"读英文分级读物",@"在家说英语",@"做亲子英文游戏",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.companionType componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion6Cell5.Jh_info = str;
                    
                }else{
                    
                    if ([model.companionType integerValue] == 1) {
                        setion6Cell5.Jh_info = @"听英文儿歌";
                        setion6Cell5.Jh_info_idStr = @"1";
                    }else if ([model.companionType integerValue] == 2){
                        setion6Cell5.Jh_info = @"看英文动画";
                        setion6Cell5.Jh_info_idStr = @"2";
                    }else if ([model.companionType integerValue] == 3){
                        setion6Cell5.Jh_info = @"读过英文绘本";
                        setion6Cell5.Jh_info_idStr = @"3";
                    }else if ([model.companionType integerValue] == 4){
                        setion6Cell5.Jh_info = @"读英文分级读物";
                        setion6Cell5.Jh_info_idStr = @"4";
                    }else if ([model.companionType integerValue] == 5){
                        setion6Cell5.Jh_info = @"在家说英语";
                        setion6Cell5.Jh_info_idStr = @"5";
                    }else if ([model.companionType integerValue] == 6){
                        setion6Cell5.Jh_info = @"做亲子游戏";
                        setion6Cell5.Jh_info_idStr = @"6";
                    }else if ([model.companionType integerValue] == 7){
                        setion6Cell5.Jh_info = @"其它";
                        setion6Cell5.Jh_info_idStr = @"7";
                    }
                }
//                setion6Cell5.Jh_info = model.companionType;
            }
#pragma responseDiet   负责饮食 多选 多选 1,爸爸 2,妈妈 3,爷爷 4,奶奶 5,姥姥 6,姥爷 7,其它
//            @"responseDiet":setion7Cell0.Jh_info_idStr == nil ?@"":setion7Cell0.Jh_info_idStr,//家庭成员在养育孩子工作中的分工
            if ([model.responseDiet isEqual:[NSNull null]]) {
                setion7Cell0.Jh_info = @"";
            }else{
                
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseDiet containsString:@","]) {
                    daArray = [model.responseDiet componentsSeparatedByString:@","].mutableCopy;
                }else{
                    if ([model.responseDiet isEqualToString:@""]||model.responseDiet==nil) {//添加为空判断
                        
                    }else{
                        [daArray addObject:model.responseDiet];
                    }
                }
                
                
                setion7Cell0.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"饮食" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseDiet containsString:@","]) {
                    
                    setion7Cell0.Jh_info_idStr = model.responseDiet;
                    
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseDiet componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell0.Jh_info = str;
                    
                }else{
                
                
                    if ([model.responseDiet integerValue] == 1) {
                        setion7Cell0.Jh_info = @"爸爸";
                        setion7Cell0.Jh_info_idStr = @"1";
                    }else if ([model.responseDiet integerValue] == 2){
                        setion7Cell0.Jh_info = @"妈妈";
                        setion7Cell0.Jh_info_idStr = @"2";
                    }else if ([model.responseDiet integerValue] == 3){
                        setion7Cell0.Jh_info = @"爷爷";
                        setion7Cell0.Jh_info_idStr = @"3";
                    }else if ([model.responseDiet integerValue] == 4){
                        setion7Cell0.Jh_info = @"奶奶";
                        setion7Cell0.Jh_info_idStr = @"4";
                    }else if ([model.responseDiet integerValue] == 5){
                        setion7Cell0.Jh_info = @"姥姥";
                        setion7Cell0.Jh_info_idStr = @"5";
                    }else if ([model.responseDiet integerValue] == 6){
                        setion7Cell0.Jh_info = @"姥爷";
                        setion7Cell0.Jh_info_idStr = @"6";
                    }else if ([model.responseDiet integerValue] == 7){
                        setion7Cell0.Jh_info = @"其它";
                        setion7Cell0.Jh_info_idStr = @"7";
                    }
                }
//                setion7Cell0.Jh_info = model.responseDiet;
            }
#pragma responseSleep   负责睡眠 多选 多选 1,爸爸 2,妈妈 3,爷爷 4,奶奶 5,姥姥 6,姥爷 7,其它
//            @"responseSleep":setion7Cell1.Jh_info_idStr == nil ?@"":setion7Cell1.Jh_info_idStr,
            if ([model.responseSleep isEqual:[NSNull null]]||model.responseSleep==nil) {//添加为空判断
                setion7Cell1.Jh_info = @"";
            }else{
                
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseSleep containsString:@","]) {
                    daArray = [model.responseSleep componentsSeparatedByString:@","].mutableCopy;
                }else{
                    [daArray addObject:model.responseSleep];
                }
                
                
                setion7Cell1.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"睡眠" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseSleep containsString:@","]) {
                    
                    setion7Cell1.Jh_info_idStr = model.responseSleep;
                    
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseSleep componentsSeparatedByString:@","].mutableCopy;
//                    if ([idarray containsObject:@"0"]||[idarray containsObject:@""]) {
//                        [idarray removeObject:@"0"];
//                        [idarray removeObject:@""];
//                    }
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell1.Jh_info = str;
                    
                }else{
                    if ([model.responseSleep integerValue] == 1) {
                        setion7Cell1.Jh_info = @"爸爸";
                        setion7Cell1.Jh_info_idStr = @"1";
                    }else if ([model.responseSleep integerValue] == 2){
                        setion7Cell1.Jh_info = @"妈妈";
                        setion7Cell1.Jh_info_idStr = @"2";
                    }else if ([model.responseSleep integerValue] == 3){
                        setion7Cell1.Jh_info = @"爷爷";
                        setion7Cell1.Jh_info_idStr = @"3";
                    }else if ([model.responseSleep integerValue] == 4){
                        setion7Cell1.Jh_info = @"奶奶";
                        setion7Cell1.Jh_info_idStr = @"4";
                    }else if ([model.responseSleep integerValue] == 5){
                        setion7Cell1.Jh_info = @"姥姥";
                        setion7Cell1.Jh_info_idStr = @"5";
                    }else if ([model.responseSleep integerValue] == 6){
                        setion7Cell1.Jh_info = @"姥爷";
                        setion7Cell1.Jh_info_idStr = @"6";
                    }else if ([model.responseSleep integerValue] == 7){
                        setion7Cell1.Jh_info = @"其它";
                        setion7Cell1.Jh_info_idStr = @"7";
                    }
                }
//                setion7Cell1.Jh_info = model.responseSleep;
            }
#pragma responseReading   负责读书 多选 多选 1,爸爸 2,妈妈 3,爷爷 4,奶奶 5,姥姥 6,姥爷 7,其它
//            @"responseReading":setion7Cell2.Jh_info_idStr == nil ?@"":setion7Cell2.Jh_info_idStr,
            if ([model.responseReading isEqual:[NSNull null]]||model.responseReading==nil) {//添加为空判断
                setion7Cell2.Jh_info = @"";
            }else{
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseReading containsString:@","]) {
                    daArray = [model.responseReading componentsSeparatedByString:@","].mutableCopy;
                }else{
                    [daArray addObject:model.responseReading];
                }
                
                
                setion7Cell2.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"读书" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseReading containsString:@","]) {
                    
                    setion7Cell2.Jh_info_idStr = model.responseReading;
                    
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseReading componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell2.Jh_info = str;
                    
                }else{
                    if ([model.responseReading integerValue] == 1) {
                        setion7Cell2.Jh_info = @"爸爸";
                        setion7Cell2.Jh_info_idStr = @"1";
                    }else if ([model.responseReading integerValue] == 2){
                        setion7Cell2.Jh_info = @"妈妈";
                        setion7Cell2.Jh_info_idStr = @"2";
                    }else if ([model.responseReading integerValue] == 3){
                        setion7Cell2.Jh_info = @"爷爷";
                        setion7Cell2.Jh_info_idStr = @"3";
                    }else if ([model.responseReading integerValue] == 4){
                        setion7Cell2.Jh_info = @"奶奶";
                        setion7Cell2.Jh_info_idStr = @"4";
                    }else if ([model.responseReading integerValue] == 5){
                        setion7Cell2.Jh_info = @"姥姥";
                        setion7Cell2.Jh_info_idStr = @"5";
                    }else if ([model.responseReading integerValue] == 6){
                        setion7Cell2.Jh_info = @"姥爷";
                        setion7Cell2.Jh_info_idStr = @"6";
                    }else if ([model.responseReading integerValue] == 7){
                        setion7Cell2.Jh_info = @"其它";
                        setion7Cell2.Jh_info_idStr = @"7";
                    }
                }
//                setion7Cell2.Jh_info = model.responseReading;
            }
#pragma responseHomeRead   负责在家陪伴 多选 1,爸爸 2,妈妈 3,爷爷 4,姥姥 5,姥爷 6,其它
//            @"responseHomeRead":setion7Cell3.Jh_info_idStr == nil ?@"":setion7Cell3.Jh_info_idStr,
            if ([model.responseHomeRead isEqual:[NSNull null]]||model.responseHomeRead==nil) {//添加为空判断
                setion7Cell3.Jh_info = @"";
            }else{
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseHomeRead containsString:@","]) {
                    daArray = [model.responseHomeRead componentsSeparatedByString:@","].mutableCopy;
                }else{
                    [daArray addObject:model.responseHomeRead];
                }
                
                
                setion7Cell3.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"在家陪伴" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseHomeRead containsString:@","]) {
                    
                    setion7Cell3.Jh_info_idStr = model.responseHomeRead;
                    
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseHomeRead componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell3.Jh_info = str;
                    
                }else{
                    if ([model.responseHomeRead integerValue] == 1) {
                        setion7Cell3.Jh_info = @"爸爸";
                        setion7Cell3.Jh_info_idStr = @"1";
                    }else if ([model.responseHomeRead integerValue] == 2){
                        setion7Cell3.Jh_info = @"妈妈";
                        setion7Cell3.Jh_info_idStr = @"2";
                    }else if ([model.responseHomeRead integerValue] == 3){
                        setion7Cell3.Jh_info = @"爷爷";
                        setion7Cell3.Jh_info_idStr = @"3";
                    }
    //                else if ([model.responseHomeRead integerValue] == 4){
    //                    setion7Cell3.Jh_info = @"奶奶";
    //                    setion7Cell3.Jh_info_idStr = @"4";
    //                }
                    else if ([model.responseHomeRead integerValue] == 4){
                        setion7Cell3.Jh_info = @"姥姥";
                        setion7Cell3.Jh_info_idStr = @"4";
                    }else if ([model.responseHomeRead integerValue] == 5){
                        setion7Cell3.Jh_info = @"姥爷";
                        setion7Cell3.Jh_info_idStr = @"5";
                    }else if ([model.responseHomeRead integerValue] == 6){
                        setion7Cell3.Jh_info = @"其它";
                        setion7Cell3.Jh_info_idStr = @"6";
                    }
                }
//                setion7Cell3.Jh_info = model.responseHomeRead;
            }
#pragma responseOutRead  负责在外陪伴 多选 1,爸爸 2,妈妈 3,爷爷 4,奶奶 5,姥姥 6,姥爷 7,其它
//            @"responseOutRead":setion7Cell4.Jh_info_idStr == nil ?@"":setion7Cell4.Jh_info_idStr,
            if ([model.responseOutRead isEqual:[NSNull null]]||model.responseOutRead==nil) {
                setion7Cell4.Jh_info = @"";
//                NSLog(@"%@",model.responseOutRead);
            }else{
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseOutRead containsString:@","]) {
                    daArray = [model.responseOutRead componentsSeparatedByString:@","].mutableCopy;
                }else{
                    [daArray addObject:model.responseOutRead];
                }
                
                
                setion7Cell4.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"在外陪伴" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseOutRead containsString:@","]) {
                    
                    setion7Cell4.Jh_info_idStr = model.responseOutRead;
                  
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseOutRead componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell4.Jh_info = str;
                    
                }else{
                    if ([model.responseOutRead integerValue] == 1) {
                        setion7Cell4.Jh_info = @"爸爸";
                        setion7Cell4.Jh_info_idStr = @"1";
                    }else if ([model.responseOutRead integerValue] == 2){
                        setion7Cell4.Jh_info = @"妈妈";
                        setion7Cell4.Jh_info_idStr = @"2";
                    }else if ([model.responseOutRead integerValue] == 3){
                        setion7Cell4.Jh_info = @"爷爷";
                        setion7Cell4.Jh_info_idStr = @"3";
                    }else if ([model.responseOutRead integerValue] == 4){
                        setion7Cell4.Jh_info = @"奶奶";
                        setion7Cell4.Jh_info_idStr = @"4";
                    }else if ([model.responseOutRead integerValue] == 5){
                        setion7Cell4.Jh_info = @"姥姥";
                        setion7Cell4.Jh_info_idStr = @"5";
                    }else if ([model.responseOutRead integerValue] == 6){
                        setion7Cell4.Jh_info = @"姥爷";
                        setion7Cell4.Jh_info_idStr = @"6";
                    }else if ([model.responseOutRead integerValue] == 7){
                        setion7Cell4.Jh_info = @"其它";
                        setion7Cell4.Jh_info_idStr = @"7";
                    }
                }
//                setion7Cell4.Jh_info = model.responseOutRead;
            }
#pragma responseDiscipline  负责在外纪律 多选 1,爸爸 2,妈妈 3,爷爷 4,奶奶 5,姥姥 6,姥爷 7,其它
//            @"responseDiscipline":setion7Cell5.Jh_info_idStr == nil ?@"":setion7Cell5.Jh_info_idStr,
            if ([model.responseDiscipline isEqual:[NSNull null]]||model.responseDiscipline==nil) {
                setion7Cell5.Jh_info = @"";
            }else{
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseDiscipline containsString:@","]) {
                    daArray = [model.responseDiscipline componentsSeparatedByString:@","].mutableCopy;
                }else{
                    [daArray addObject:model.responseDiscipline];
                }
                
                
                setion7Cell5.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"纪律" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseDiscipline containsString:@","]) {
                    
                    setion7Cell5.Jh_info_idStr = model.responseDiscipline;
                    
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"奶奶",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseDiscipline componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell5.Jh_info = str;
                    
                }else{
                    if ([model.responseDiscipline integerValue] == 1) {
                        setion7Cell5.Jh_info = @"爸爸";
                        setion7Cell5.Jh_info_idStr = @"1";
                    }else if ([model.responseDiscipline integerValue] == 2){
                        setion7Cell5.Jh_info = @"妈妈";
                        setion7Cell5.Jh_info_idStr = @"2";
                    }else if ([model.responseDiscipline integerValue] == 3){
                        setion7Cell5.Jh_info = @"爷爷";
                        setion7Cell5.Jh_info_idStr = @"3";
                    }else if ([model.responseDiscipline integerValue] == 4){
                        setion7Cell5.Jh_info = @"奶奶";
                        setion7Cell5.Jh_info_idStr = @"4";
                    }else if ([model.responseDiscipline integerValue] == 5){
                        setion7Cell5.Jh_info = @"姥姥";
                        setion7Cell5.Jh_info_idStr = @"5";
                    }else if ([model.responseDiscipline integerValue] == 6){
                        setion7Cell5.Jh_info = @"姥爷";
                        setion7Cell5.Jh_info_idStr = @"6";
                    }else if ([model.responseDiscipline integerValue] == 7){
                        setion7Cell5.Jh_info = @"其它";
                        setion7Cell5.Jh_info_idStr = @"7";
                    }
                }
//                setion7Cell5.Jh_info = model.responseDiscipline;
            }
#pragma responseBaseUnparet   基本不参与教养 多选 1,爸爸 2,妈妈 3,爷爷 4,姥姥 5,姥爷 6,其它
//            @"responseBaseUnparet":setion7Cell6.Jh_info_idStr == nil ?@"":setion7Cell6.Jh_info_idStr
            if ([model.responseBaseUnparet isEqual:[NSNull null]]||model.responseBaseUnparet==nil) {
                setion7Cell6.Jh_info = @"";
            }else{
                NSMutableArray *daArray = [[NSMutableArray alloc]init];
                
                if ([model.responseBaseUnparet containsString:@","]) {
                    daArray = [model.responseBaseUnparet componentsSeparatedByString:@","].mutableCopy;
                }else{
                    if ([model.responseBaseUnparet isEqualToString:@""]) {
                        
                    }else{
                        [daArray addObject:model.responseBaseUnparet];
                    }
                }
                
                
                setion7Cell6.Jh_CellSelectCellBlock = ^(JhFormCellModel *cellModel) {
                    VKMeBiePersonView *biepersonView = [[VKMeBiePersonView alloc]initWithTitle:@"基本不参与教养" withDataArray:daArray withTitleArray:@[@"爸爸",@"妈妈",@"爷爷",@"姥姥",@"姥爷",@"其他"].mutableCopy];
                    
                    [[UIApplication sharedApplication].keyWindow addSubview:biepersonView];
                    [biepersonView mas_makeConstraints:^(MASConstraintMaker *make) {
                        make.edges.equalTo(@0);
                    }];
                    biepersonView.personViewBlock = ^(NSMutableArray *dataArray,NSMutableArray *titleArray) {
                        
                        cellModel.Jh_info_idStr = [dataArray componentsJoinedByString:@","];
                        cellModel.Jh_info = [titleArray componentsJoinedByString:@","];
                        [biepersonView cancelDownView];
                        [weakSelf.Jh_formTableView reloadData];
                    };
                };
                if ([model.responseBaseUnparet containsString:@","]) {
                    
                    setion7Cell6.Jh_info_idStr = model.responseBaseUnparet;
                    
                    NSMutableArray *array = @[@"爸爸",@"妈妈",@"爷爷",@"姥姥",@"姥爷",@"其他"].mutableCopy;
                    NSMutableArray *idarray = [model.responseBaseUnparet componentsSeparatedByString:@","].mutableCopy;
                    if ([idarray containsObject:@"0"]) {
                        [idarray removeObject:@"0"];
                    }
                    if ([idarray containsObject:@""]) {
                        [idarray removeObject:@""];
                    }
                    NSString *str = @"";
                    for (int i = 1; i <= idarray.count; i++) {
                        if (i == idarray.count) {
                            str = [NSString stringWithFormat:@"%@%@",str,array[[idarray[i-1] integerValue] - 1]];
                        }else{
                            str = [NSString stringWithFormat:@"%@%@,",str,array[[idarray[i-1] integerValue]-1]];
                            
                        }
                        
                    }
                    
                    setion7Cell6.Jh_info = str;
                    
                }else{
                    if ([model.responseBaseUnparet integerValue] == 1) {
                        setion7Cell6.Jh_info = @"爸爸";
                        setion7Cell6.Jh_info_idStr = @"1";
                    }else if ([model.responseBaseUnparet integerValue] == 2){
                        setion7Cell6.Jh_info = @"妈妈";
                        setion7Cell6.Jh_info_idStr = @"2";
                    }else if ([model.responseBaseUnparet integerValue] == 3){
                        setion7Cell6.Jh_info = @"爷爷";
                        setion7Cell6.Jh_info_idStr = @"3";
                    }else
    //                    if ([model.responseReading integerValue] == 4){
    //                    setion7Cell2.Jh_info = @"奶奶";
    //                    setion7Cell2.Jh_info_idStr = @"4";
    //                }else
                        if ([model.responseBaseUnparet integerValue] == 4){
                        setion7Cell6.Jh_info = @"姥姥";
                        setion7Cell6.Jh_info_idStr = @"4";
                    }else if ([model.responseBaseUnparet integerValue] == 5){
                        setion7Cell6.Jh_info = @"姥爷";
                        setion7Cell6.Jh_info_idStr = @"5";
                    }else if ([model.responseBaseUnparet integerValue] == 6){
                        setion7Cell6.Jh_info = @"其它";
                        setion7Cell6.Jh_info_idStr = @"6";
                    }
                }
//                setion7Cell6.Jh_info = model.responseBaseUnparet;
            }
            
        }else{
            [MBProgressHUD showSuccess:result[@"msg"] toView:weakSelf.view];
        }
        [self.Jh_formTableView reloadData];
    }];
    
    
    
    
//    __weak typeof(self)weakSelf = self;
//    __weak typeof(self)weakSelf = self;
    
    self.Jh_submitStr = @"";
    self.Jh_formSubmitBlock = ^{
//        NSLog(@" 点击提交按钮 ");
        
        // 第一组
        if (setion0Cell0.Jh_info.length == 0 || [setion0Cell0.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写姓名" toView:weakSelf.view];
            return ;
        }
        if (setion0Cell1.Jh_info.length == 0 || [setion0Cell1.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写小名" toView:weakSelf.view];
            return ;
        }
        if (setion0Cell2.Jh_info.length == 0 || [setion0Cell2.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写英文名" toView:weakSelf.view];
            return ;
        }
        
   
        if (setion0Cell3.Jh_info.length == 0 || [setion0Cell3.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择性别" toView:weakSelf.view];
            return ;
        }
        if (setion0Cell4.Jh_info.length == 0 || [setion0Cell4.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择出生日期" toView:weakSelf.view];
            return ;
        }
        
        NSString *currentYear = [setion0Cell4.Jh_info substringToIndex:4];
        
        NSDate *date = [NSDate date];
        
        NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
        
        
        [formatter setDateStyle:NSDateFormatterMediumStyle];
        
        [formatter setTimeStyle:NSDateFormatterShortStyle];
        
        [formatter setDateFormat:@"YYYY"];
        NSString *DateTime = [formatter stringFromDate:date];
//        2019 - 2013
        if ([DateTime intValue]-[currentYear intValue]>9) {
            [MBProgressHUD showSuccess:@"请选择正确的出生年月" toView:weakSelf.view];
            return ;
        }
        if ([DateTime intValue]-[currentYear intValue]<0) {
            [MBProgressHUD showSuccess:@"请选择正确的出生年月" toView:weakSelf.view];
            return ;
        }
        if (setion0Cell5.Jh_info.length == 0 || [setion0Cell5.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择所在城市" toView:weakSelf.view];
            return ;
        }
        if (setion0Cell6.Jh_info.length == 0 || [setion0Cell6.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择兄弟姐妹" toView:weakSelf.view];
            return ;
        }
        
        // 第二组
        if (setion1Cell0.Jh_info.length == 0 || [setion1Cell0.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写姓名" toView:weakSelf.view];
            return ;
        }
        if (setion1Cell1.Jh_info.length == 0 || [setion1Cell1.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写电话" toView:weakSelf.view];
            return ;
        }
        if (![setion1Cell1.Jh_info isMobile]) {
            [MBProgressHUD showSuccess:@"请填写正确手机号" toView:weakSelf.view];
            return ;
        }
        
        if (setion1Cell2.Jh_info.length == 0 || [setion1Cell2.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写QQ" toView:weakSelf.view];
            return ;
        }

        if (setion1Cell3.Jh_info.length == 0 || [setion1Cell3.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写微信" toView:weakSelf.view];
            return ;
        }
        if (setion1Cell4.Jh_info.length == 0 || [setion1Cell4.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写Email" toView:weakSelf.view];
            return ;
        }
        
        BOOL isEmail = [weakSelf isValidateEmail:setion1Cell4.Jh_info];
        if (!isEmail) {
            [MBProgressHUD showSuccess:@"请填写正确的邮箱" toView:weakSelf.view];
            return ;
        }
        if (setion1Cell5.Jh_info.length == 0 || [setion1Cell5.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写联系地址" toView:weakSelf.view];
            return ;
        }
        if (setion1Cell6.Jh_info.length == 0 || [setion1Cell6.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写年龄" toView:weakSelf.view];
            return ;
        }
        if ([setion1Cell6.Jh_info integerValue]>99) {
            [MBProgressHUD showSuccess:@"请填写小于99" toView:weakSelf.view];
            return ;
        }

        if (setion1Cell7.Jh_info.length == 0 || [setion1Cell7.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择与儿童的关系" toView:weakSelf.view];
            return ;
        }
        if (setion1Cell9.Jh_info.length == 0 || [setion1Cell9.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择学历" toView:weakSelf.view];
            return ;
        }
        //职业 setion1Cell10.Jh_info
        if (setion1Cell10.Jh_info.length == 0 || [setion1Cell10.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择职业" toView:weakSelf.view];
            return ;
        }
        
        // 第三组
        
        if (setion2Cell0.Jh_info.length == 0 || [setion2Cell0.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写姓名" toView:weakSelf.view];
            return ;
        }
        if (setion2Cell1.Jh_info.length == 0 || [setion2Cell1.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请填写年龄" toView:weakSelf.view];
            return ;
        }
        if (setion2Cell2.Jh_info.length == 0 || [setion2Cell2.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择与儿童的关系" toView:weakSelf.view];
            return ;
        }
        if (setion2Cell3.Jh_info.length == 0 || [setion2Cell3.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择学历" toView:weakSelf.view];
            return ;
        }
        //职业
        if (setion2Cell4.Jh_info.length == 0 || [setion1Cell4.Jh_info isEqualToString:@""]) {
            [MBProgressHUD showSuccess:@"请选择职业" toView:weakSelf.view];
            return ;
        }
        
        
        NSMutableDictionary *params = @{@"token":[UserModel getUserModel].token,
                                        @"mainRelationUsername":setion1Cell0.Jh_info, // 主要联系人
                                        @"mainRelationTel":setion1Cell1.Jh_info,
                                        @"mainRelationQq":setion1Cell2.Jh_info,
                                        @"mainRelationWx":setion1Cell3.Jh_info,
                                        @"mainRelationEmail":setion1Cell4.Jh_info,
                                        @"mainRelationAddress":setion1Cell5.Jh_info,
                                        @"mainRelationAge":setion1Cell6.Jh_info,
                                        @"mainRelationRelate":setion1Cell7.Jh_info_idStr,
                                        @"mainRelationEducat":setion1Cell9.Jh_info_idStr,
                                        @"mainRelationProfission":setion1Cell10.Jh_info_idStr,
                                        @"bringProblem":footerV.textView.text, // 养育中的难题
                                        @"bringProblemSelect":[footerV.dataArray componentsJoinedByString:@","],
                                        @"babyUsername":setion0Cell0.Jh_info, // 儿童基本信息
                                        @"babyNickname":setion0Cell1.Jh_info,
                                        @"babyEnName":setion0Cell2.Jh_info,
                                        @"babySex":[setion0Cell3.Jh_info isEqualToString:@"女"] ? @"0":@"1",
                                        @"babyBirthday":setion0Cell4.Jh_info,
                                        @"babyCity":setion0Cell5.Jh_info,
                                        @"babySister":setion0Cell6.Jh_info_idStr,
                                        @"liveLaw": setion4Cell0.Jh_info_idStr == nil ?@"":setion4Cell0.Jh_info_idStr,// 生活习惯描述
                                        @"sleepCase":setion4Cell1.Jh_info_idStr == nil ?@"":setion4Cell1.Jh_info_idStr,
                                        @"sleepQuality":setion4Cell2.Jh_info_idStr == nil ?@"":setion4Cell2.Jh_info_idStr,
                                        @"sleepStartTime":[setion4Cell3.Jh_info containsString:@"-"]?[setion4Cell3.Jh_info componentsSeparatedByString:@" - "][0]:@"",
                                        @"sleepEndTime":[setion4Cell3.Jh_info containsString:@"-"]?[setion4Cell3.Jh_info componentsSeparatedByString:@" - "][1]:@"",
                                        @"dietaryHabit":setion4Cell4.Jh_info_idStr == nil ?@"":setion4Cell4.Jh_info_idStr,
                                        @"healthCase":contactView.textView.text, // 健康状况描述
                                        @"socialAndInterest":[gridView.dataArray componentsJoinedByString:@","],// 社交能力与兴趣描述
                                        @"otherRelationName":setion2Cell0.Jh_info, //  其他联系人
                                        @"otherRelationAge":setion2Cell1.Jh_info,
                                        @"otherRelation":setion2Cell2.Jh_info_idStr,
                                        @"otherRelationEducat":setion2Cell3.Jh_info_idStr,
                                        @"otherRelationProfission":setion2Cell4.Jh_info_idStr,
                                        @"companionName":setion6Cell0.Jh_info_idStr == nil?@"":setion6Cell0.Jh_info_idStr,// 实施的主要负责人信息
                                        @"companionEnglishGrade":setion6Cell1.Jh_info_idStr == nil?@"":setion6Cell1.Jh_info_idStr,
                                        @"companionTongueGrade":setion6Cell2.Jh_info_idStr == nil?@"":setion6Cell2.Jh_info_idStr,
                                        @"companionEnglishAccent":setion6Cell3.Jh_info_idStr == nil ?@"":setion6Cell3.Jh_info_idStr,
                                        @"companionStartTime":[setion6Cell4.Jh_info containsString:@"-"]?[setion6Cell4.Jh_info componentsSeparatedByString:@" - "][0]:@"",
                                        @"companionEndTime":[setion6Cell4.Jh_info containsString:@"-"]?[setion6Cell4.Jh_info componentsSeparatedByString:@" - "][1]:@"",
                                        @"companionType":setion6Cell5.Jh_info_idStr == nil ?@"":setion6Cell5.Jh_info_idStr,
                                        @"responseDiet":setion7Cell0.Jh_info_idStr == nil ?@"":setion7Cell0.Jh_info_idStr,//家庭成员在养育孩子工作中的分工
                                        @"responseSleep":setion7Cell1.Jh_info_idStr == nil ?@"":setion7Cell1.Jh_info_idStr,
                                        @"responseReading":setion7Cell2.Jh_info_idStr == nil ?@"":setion7Cell2.Jh_info_idStr,
                                        @"responseHomeRead":setion7Cell3.Jh_info_idStr == nil ?@"":setion7Cell3.Jh_info_idStr,
                                        @"responseOutRead":setion7Cell4.Jh_info_idStr == nil ?@"":setion7Cell4.Jh_info_idStr,
                                        @"responseDiscipline":setion7Cell5.Jh_info_idStr == nil ?@"":setion7Cell5.Jh_info_idStr,
                                        @"responseBaseUnparet":setion7Cell6.Jh_info_idStr == nil ?@"":setion7Cell6.Jh_info_idStr
                                }.mutableCopy;
        
        MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:weakSelf.view animated:YES];
        hud.labelText = @"正在提交...";
        [hud show:YES];

        [WYHXNetWorkService netWorkSerViceRequestWithPostUrl:WKStudyMyCommitUserInfo withPostParams:params withBlock:^(NSDictionary *result, NSError *error) {
            hud.hidden = YES;
            if ([result[@"code"]integerValue] == 200) {
//
                
                [MBProgressHUD showSuccess:@"提交成功" toView:weakSelf.view];
                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                        
                        [weakSelf.navigationController popViewControllerAnimated:YES];
                    });
                
            }else{
                [MBProgressHUD showSuccess:result[@"msg"] toView:weakSelf.view];
            }
        }];
    };
    
}

-(BOOL)isValidateEmail:(NSString *)email {
    
    NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";
    NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES%@",emailRegex];
    return [emailTest evaluateWithObject:email];
    
}

#pragma mark - 提交请求
-(void)SubmitRequest{
    
    
    
}


- (void)BackAction{
    [self.navigationController popViewControllerAnimated:YES];
}
@end
